/**
 * Generate time : 2011-06-28 1:29:13
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.cm.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCMChangepriceHis
 * 
 */
public class ZMCMChangepriceHis extends DaoEPBase {

	private String fdKeyId = " "; /* 主键 */
	private String fdTypeCode = " "; /* 类别编码 */
	private String fdMaterialId = " "; /* 物资ID */
	private String fdMaterialCode = " "; /* 物资编码 */
	private String fdMaterialInnerCode = " "; /* 物资内码 */
	private String fdMaterialName = " "; /* 物资名称 */
	private String fdChangeType = " "; /* 调价类型 */
	private String fdChangeDate = " "; /* 调价日期 */
	private Double fdChangeRate = new Double(0); /* 调整比率 */
	private Double fdChangePrice = new Double(0); /* 价格调整 */
	private Double fdBeforePrice = new Double(0); /* 原价格 */
	private Double fdAfterPrice = new Double(0); /* 现价格 */
	private String fdChanger = " "; /* 调整人 */
	private String fdChangeDepartment = " "; /* 调整单位 */
	private String fdChangeStatus = " "; /* 调价状态 */
	private String fdChangeMonth = " "; /* 调价所属月 */
	// 添加字段
	private String fdSpecModel = " "; /* 规格型号 */
	private String fdNumber = " "; /* 图号 */
	private String fdQuality = " "; /* 材质 */
	private String fdTypeName = " "; /* 类别名称 */
	
	private Double fdStockNum = new Double(0);

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("主键");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdTypeCode");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("类别编码");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMaterialId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("物资ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMaterialCode");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("物资编码");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMaterialInnerCode");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("物资内码");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMaterialName");
		eiColumn.setFieldLength(80);
		eiColumn.setDescName("物资名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdChangeType");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("调价类型");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdChangeDate");
		eiColumn.setFieldLength(19);
		eiColumn.setDescName("调价日期");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdChangeRate");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("调整比率");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdChangePrice");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("价格调整");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdBeforePrice");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("原价格");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdAfterPrice");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("现价格");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdChanger");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("调整人");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdChangeDepartment");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("调整单位");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdChangeStatus");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("调价状态");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdChangeMonth");
		eiColumn.setFieldLength(2);
		eiColumn.setDescName("调价所属月");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdSpecModel");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("规格型号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdNumber");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("图号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdQuality");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("材质");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdTypeName");
		eiColumn.setFieldLength(80);
		eiColumn.setDescName("类别名称");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdStockNum");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("库存数量");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCMChangepriceHis() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - 主键
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - 主键
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdTypeCode - 类别编码
	 * 
	 * @return the fdTypeCode
	 */
	public String getFdTypeCode() {
		return this.fdTypeCode;
	}

	/**
	 * set the fdTypeCode - 类别编码
	 */
	public void setFdTypeCode(String fdTypeCode) {
		this.fdTypeCode = fdTypeCode;
	}

	/**
	 * get the fdMaterialId - 物资ID
	 * 
	 * @return the fdMaterialId
	 */
	public String getFdMaterialId() {
		return this.fdMaterialId;
	}

	/**
	 * set the fdMaterialId - 物资ID
	 */
	public void setFdMaterialId(String fdMaterialId) {
		this.fdMaterialId = fdMaterialId;
	}

	/**
	 * get the fdMaterialCode - 物资编码
	 * 
	 * @return the fdMaterialCode
	 */
	public String getFdMaterialCode() {
		return this.fdMaterialCode;
	}

	/**
	 * set the fdMaterialCode - 物资编码
	 */
	public void setFdMaterialCode(String fdMaterialCode) {
		this.fdMaterialCode = fdMaterialCode;
	}

	/**
	 * get the fdMaterialInnerCode - 物资内码
	 * 
	 * @return the fdMaterialInnerCode
	 */
	public String getFdMaterialInnerCode() {
		return this.fdMaterialInnerCode;
	}

	/**
	 * set the fdMaterialInnerCode - 物资内码
	 */
	public void setFdMaterialInnerCode(String fdMaterialInnerCode) {
		this.fdMaterialInnerCode = fdMaterialInnerCode;
	}

	/**
	 * get the fdMaterialName - 物资名称
	 * 
	 * @return the fdMaterialName
	 */
	public String getFdMaterialName() {
		return this.fdMaterialName;
	}

	/**
	 * set the fdMaterialName - 物资名称
	 */
	public void setFdMaterialName(String fdMaterialName) {
		this.fdMaterialName = fdMaterialName;
	}

	/**
	 * get the fdChangeType - 调价类型
	 * 
	 * @return the fdChangeType
	 */
	public String getFdChangeType() {
		return this.fdChangeType;
	}

	/**
	 * set the fdChangeType - 调价类型
	 */
	public void setFdChangeType(String fdChangeType) {
		this.fdChangeType = fdChangeType;
	}

	/**
	 * get the fdChangeDate - 调价日期
	 * 
	 * @return the fdChangeDate
	 */
	public String getFdChangeDate() {
		return this.fdChangeDate;
	}

	/**
	 * set the fdChangeDate - 调价日期
	 */
	public void setFdChangeDate(String fdChangeDate) {
		this.fdChangeDate = fdChangeDate;
	}

	/**
	 * get the fdChangeRate - 调整比率
	 * 
	 * @return the fdChangeRate
	 */
	public Double getFdChangeRate() {
		return this.fdChangeRate;
	}

	/**
	 * set the fdChangeRate - 调整比率
	 */
	public void setFdChangeRate(Double fdChangeRate) {
		this.fdChangeRate = fdChangeRate;
	}

	/**
	 * get the fdChangePrice - 价格调整
	 * 
	 * @return the fdChangePrice
	 */
	public Double getFdChangePrice() {
		return this.fdChangePrice;
	}

	/**
	 * set the fdChangePrice - 价格调整
	 */
	public void setFdChangePrice(Double fdChangePrice) {
		this.fdChangePrice = fdChangePrice;
	}

	/**
	 * get the fdBeforePrice - 原价格
	 * 
	 * @return the fdBeforePrice
	 */
	public Double getFdBeforePrice() {
		return this.fdBeforePrice;
	}

	/**
	 * set the fdBeforePrice - 原价格
	 */
	public void setFdBeforePrice(Double fdBeforePrice) {
		this.fdBeforePrice = fdBeforePrice;
	}

	/**
	 * get the fdAfterPrice - 现价格
	 * 
	 * @return the fdAfterPrice
	 */
	public Double getFdAfterPrice() {
		return this.fdAfterPrice;
	}

	/**
	 * set the fdAfterPrice - 现价格
	 */
	public void setFdAfterPrice(Double fdAfterPrice) {
		this.fdAfterPrice = fdAfterPrice;
	}

	/**
	 * get the fdChanger - 调整人
	 * 
	 * @return the fdChanger
	 */
	public String getFdChanger() {
		return this.fdChanger;
	}

	/**
	 * set the fdChanger - 调整人
	 */
	public void setFdChanger(String fdChanger) {
		this.fdChanger = fdChanger;
	}

	/**
	 * get the fdChangeDepartment - 调整单位
	 * 
	 * @return the fdChangeDepartment
	 */
	public String getFdChangeDepartment() {
		return this.fdChangeDepartment;
	}

	/**
	 * set the fdChangeDepartment - 调整单位
	 */
	public void setFdChangeDepartment(String fdChangeDepartment) {
		this.fdChangeDepartment = fdChangeDepartment;
	}

	/**
	 * get the fdChangeStatus - 调价状态
	 * 
	 * @return the fdChangeStatus
	 */
	public String getFdChangeStatus() {
		return this.fdChangeStatus;
	}

	/**
	 * set the fdChangeStatus - 调价状态
	 */
	public void setFdChangeStatus(String fdChangeStatus) {
		this.fdChangeStatus = fdChangeStatus;
	}

	/**
	 * get the fdChangeMonth - 调价所属月
	 * 
	 * @return the fdChangeMonth
	 */
	public String getFdChangeMonth() {
		return this.fdChangeMonth;
	}

	/**
	 * set the fdChangeMonth - 调价所属月
	 */
	public void setFdChangeMonth(String fdChangeMonth) {
		this.fdChangeMonth = fdChangeMonth;
	}

	/**
	 * get the fdSpecModel - 规格型号
	 * 
	 * @return the fdSpecModel
	 */
	public String getFdSpecModel() {
		return this.fdSpecModel;
	}

	/**
	 * set the fdSpecModel - 规格型号
	 */
	public void setFdSpecModel(String fdSpecModel) {
		this.fdSpecModel = fdSpecModel;
	}

	/**
	 * get the fdNumber - 图号
	 * 
	 * @return the fdNumber
	 */
	public String getFdNumber() {
		return this.fdNumber;
	}

	/**
	 * set the fdNumber - 图号
	 */
	public void setFdNumber(String fdNumber) {
		this.fdNumber = fdNumber;
	}

	/**
	 * get the fdQuality - 材质
	 * 
	 * @return the fdQuality
	 */
	public String getFdQuality() {
		return this.fdQuality;
	}

	/**
	 * set the fdNumber - 材质
	 */
	public void setFdQuality(String fdQuality) {
		this.fdQuality = fdQuality;
	}

	/**
	 * get the fdTypeName - 类别名称
	 * 
	 * @return the fdTypeName
	 */
	public String getFdTypeName() {
		return this.fdTypeName;
	}

	/**
	 * set the fdNumber - 类别名称
	 */
	public void setFdTypeName(String fdTypeName) {
		this.fdTypeName = fdTypeName;
	}
	
	/**
	 * get the fdStockNum - 库存数量
	 * 
	 * @return the fdStockNum
	 */
	public Double getFdStockNum() {
		return this.fdStockNum;
	}

	/**
	 * set the fdStockNum - 库存数量
	 */
	public void setFdStockNum(Double fdStockNum) {
		this.fdStockNum = fdStockNum;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdTypeCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdTypeCode")), fdTypeCode));
		setFdMaterialId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMaterialId")), fdMaterialId));
		setFdMaterialCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMaterialCode")), fdMaterialCode));
		setFdMaterialInnerCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMaterialInnerCode")), fdMaterialInnerCode));
		setFdMaterialName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMaterialName")), fdMaterialName));
		setFdChangeType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdChangeType")), fdChangeType));
		setFdChangeDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdChangeDate")), fdChangeDate));
		setFdChangeRate(NumberUtils.toDouble(StringUtils.toString(map.get("fdChangeRate")), fdChangeRate));
		setFdChangePrice(NumberUtils.toDouble(StringUtils.toString(map.get("fdChangePrice")), fdChangePrice));
		setFdBeforePrice(NumberUtils.toDouble(StringUtils.toString(map.get("fdBeforePrice")), fdBeforePrice));
		setFdAfterPrice(NumberUtils.toDouble(StringUtils.toString(map.get("fdAfterPrice")), fdAfterPrice));
		setFdChanger(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdChanger")), fdChanger));
		setFdChangeDepartment(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdChangeDepartment")), fdChangeDepartment));
		setFdChangeStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdChangeStatus")), fdChangeStatus));
		setFdChangeMonth(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdChangeMonth")), fdChangeMonth));
		// 添加字段
		setFdSpecModel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdSpecModel")), fdSpecModel));
		setFdNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdNumber")), fdNumber));
		setFdQuality(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdQuality")), fdQuality));
		setFdTypeName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdTypeName")), fdTypeName));
		setFdStockNum(NumberUtils.toDouble(StringUtils.toString(map.get("fdStockNum")), fdStockNum));

	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdTypeCode", StringUtils.toString(fdTypeCode, eiMetadata.getMeta("fdTypeCode")));
		map.put("fdMaterialId", StringUtils.toString(fdMaterialId, eiMetadata.getMeta("fdMaterialId")));
		map.put("fdMaterialCode", StringUtils.toString(fdMaterialCode, eiMetadata.getMeta("fdMaterialCode")));
		map.put("fdMaterialInnerCode", StringUtils.toString(fdMaterialInnerCode, eiMetadata.getMeta("fdMaterialInnerCode")));
		map.put("fdMaterialName", StringUtils.toString(fdMaterialName, eiMetadata.getMeta("fdMaterialName")));
		map.put("fdChangeType", StringUtils.toString(fdChangeType, eiMetadata.getMeta("fdChangeType")));
		map.put("fdChangeDate", StringUtils.toString(fdChangeDate, eiMetadata.getMeta("fdChangeDate")));
		map.put("fdChangeRate", StringUtils.toString(fdChangeRate, eiMetadata.getMeta("fdChangeRate")));
		map.put("fdChangePrice", StringUtils.toString(fdChangePrice, eiMetadata.getMeta("fdChangePrice")));
		map.put("fdBeforePrice", StringUtils.toString(fdBeforePrice, eiMetadata.getMeta("fdBeforePrice")));
		map.put("fdAfterPrice", StringUtils.toString(fdAfterPrice, eiMetadata.getMeta("fdAfterPrice")));
		map.put("fdChanger", StringUtils.toString(fdChanger, eiMetadata.getMeta("fdChanger")));
		map.put("fdChangeDepartment", StringUtils.toString(fdChangeDepartment, eiMetadata.getMeta("fdChangeDepartment")));
		map.put("fdChangeStatus", StringUtils.toString(fdChangeStatus, eiMetadata.getMeta("fdChangeStatus")));
		map.put("fdChangeMonth", StringUtils.toString(fdChangeMonth, eiMetadata.getMeta("fdChangeMonth")));
		// 添加字段
		map.put("fdSpecModel", StringUtils.toString(fdSpecModel, eiMetadata.getMeta("fdSpecModel")));
		map.put("fdNumber", StringUtils.toString(fdNumber, eiMetadata.getMeta("fdNumber")));
		map.put("fdQuality", StringUtils.toString(fdQuality, eiMetadata.getMeta("fdQuality")));
		map.put("fdTypeName", StringUtils.toString(fdTypeName, eiMetadata.getMeta("fdTypeName")));
		map.put("fdStockNum", StringUtils.toString(fdStockNum, eiMetadata.getMeta("fdStockNum")));
		return map;

	}
}